{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "Iris_Subsystem.ipynb",
      "provenance": [],
      "collapsed_sections": [],
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "accelerator": "GPU"
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/EriProject/Multimodal_Biometrics/blob/master/Iris_Subsystem.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "jnDovlZ5b0o5",
        "colab_type": "code",
        "outputId": "a43f534c-db4f-46d4-8441-ca3a644a9785",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive')"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "oi3tGraDi2v8",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        " import pandas as pd\n",
        "import matplotlib.pyplot as plt\n",
        "%matplotlib inline \n",
        "import cv2\n",
        "import os\n",
        "import tensorflow as tf\n",
        "\n",
        "NUM_CLASSES = 40\n",
        "CHANNELS = 3\n",
        "IMAGE_RESIZE = 224\n",
        "RESNET50_POOLING_AVERAGE = 'avg'\n",
        "DENSE_LAYER_ACTIVATION = 'softmax'\n",
        "OBJECTIVE_FUNCTION = 'categorical_crossentropy'\n",
        "LOSS_METRICS = ['accuracy']\n",
        "EARLY_STOP_PATIENCE = 3\n",
        "\n",
        "BATCH_SIZE_TESTING = 1"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "kIXqu48yp68m",
        "colab_type": "text"
      },
      "source": [
        "STEPS_PER_EPOCH_TRAINING = training set/ batch size"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "nwglxhJtpNcx",
        "colab_type": "code",
        "outputId": "4699d18d-6ffa-4c28-cfb4-3f724444a940",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "from keras.applications import ResNet50\n",
        "from keras.models import Sequential\n",
        "from keras.applications import imagenet_utils\n",
        "from keras.layers.core import Dense, Flatten, Dropout"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Using TensorFlow backend.\n"
          ],
          "name": "stderr"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "P88Z7_ypltTR",
        "colab_type": "code",
        "outputId": "2121c923-a535-4d4c-9260-6503c09ccf97",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        }
      },
      "source": [
        "modelNew = Sequential()\n",
        "vgg16_model = Sequential()\n",
        "vgg16_model = ResNet50(include_top = False,  weights = 'imagenet')\n",
        "vgg16_model.summary()\n",
        "type(vgg16_model)\n",
        "i=0\n",
        "for layer in vgg16_model.layers:   # just exclude last layer from copying\n",
        "  i=i+1\n",
        "print('layers: ',i)\n"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "/usr/local/lib/python3.6/dist-packages/keras_applications/resnet50.py:265: UserWarning: The output shape of `ResNet50(include_top=False)` has been changed since Keras 2.2.0.\n",
            "  warnings.warn('The output shape of `ResNet50(include_top=False)` '\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "stream",
          "text": [
            "Model: \"resnet50\"\n",
            "__________________________________________________________________________________________________\n",
            "Layer (type)                    Output Shape         Param #     Connected to                     \n",
            "==================================================================================================\n",
            "input_1 (InputLayer)            (None, None, None, 3 0                                            \n",
            "__________________________________________________________________________________________________\n",
            "conv1_pad (ZeroPadding2D)       (None, None, None, 3 0           input_1[0][0]                    \n",
            "__________________________________________________________________________________________________\n",
            "conv1 (Conv2D)                  (None, None, None, 6 9472        conv1_pad[0][0]                  \n",
            "__________________________________________________________________________________________________\n",
            "bn_conv1 (BatchNormalization)   (None, None, None, 6 256         conv1[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "activation_1 (Activation)       (None, None, None, 6 0           bn_conv1[0][0]                   \n",
            "__________________________________________________________________________________________________\n",
            "pool1_pad (ZeroPadding2D)       (None, None, None, 6 0           activation_1[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "max_pooling2d_1 (MaxPooling2D)  (None, None, None, 6 0           pool1_pad[0][0]                  \n",
            "__________________________________________________________________________________________________\n",
            "res2a_branch2a (Conv2D)         (None, None, None, 6 4160        max_pooling2d_1[0][0]            \n",
            "__________________________________________________________________________________________________\n",
            "bn2a_branch2a (BatchNormalizati (None, None, None, 6 256         res2a_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_2 (Activation)       (None, None, None, 6 0           bn2a_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res2a_branch2b (Conv2D)         (None, None, None, 6 36928       activation_2[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "bn2a_branch2b (BatchNormalizati (None, None, None, 6 256         res2a_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_3 (Activation)       (None, None, None, 6 0           bn2a_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res2a_branch2c (Conv2D)         (None, None, None, 2 16640       activation_3[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "res2a_branch1 (Conv2D)          (None, None, None, 2 16640       max_pooling2d_1[0][0]            \n",
            "__________________________________________________________________________________________________\n",
            "bn2a_branch2c (BatchNormalizati (None, None, None, 2 1024        res2a_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "bn2a_branch1 (BatchNormalizatio (None, None, None, 2 1024        res2a_branch1[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "add_1 (Add)                     (None, None, None, 2 0           bn2a_branch2c[0][0]              \n",
            "                                                                 bn2a_branch1[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "activation_4 (Activation)       (None, None, None, 2 0           add_1[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res2b_branch2a (Conv2D)         (None, None, None, 6 16448       activation_4[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "bn2b_branch2a (BatchNormalizati (None, None, None, 6 256         res2b_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_5 (Activation)       (None, None, None, 6 0           bn2b_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res2b_branch2b (Conv2D)         (None, None, None, 6 36928       activation_5[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "bn2b_branch2b (BatchNormalizati (None, None, None, 6 256         res2b_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_6 (Activation)       (None, None, None, 6 0           bn2b_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res2b_branch2c (Conv2D)         (None, None, None, 2 16640       activation_6[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "bn2b_branch2c (BatchNormalizati (None, None, None, 2 1024        res2b_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_2 (Add)                     (None, None, None, 2 0           bn2b_branch2c[0][0]              \n",
            "                                                                 activation_4[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "activation_7 (Activation)       (None, None, None, 2 0           add_2[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res2c_branch2a (Conv2D)         (None, None, None, 6 16448       activation_7[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "bn2c_branch2a (BatchNormalizati (None, None, None, 6 256         res2c_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_8 (Activation)       (None, None, None, 6 0           bn2c_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res2c_branch2b (Conv2D)         (None, None, None, 6 36928       activation_8[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "bn2c_branch2b (BatchNormalizati (None, None, None, 6 256         res2c_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_9 (Activation)       (None, None, None, 6 0           bn2c_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res2c_branch2c (Conv2D)         (None, None, None, 2 16640       activation_9[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "bn2c_branch2c (BatchNormalizati (None, None, None, 2 1024        res2c_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_3 (Add)                     (None, None, None, 2 0           bn2c_branch2c[0][0]              \n",
            "                                                                 activation_7[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "activation_10 (Activation)      (None, None, None, 2 0           add_3[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res3a_branch2a (Conv2D)         (None, None, None, 1 32896       activation_10[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3a_branch2a (BatchNormalizati (None, None, None, 1 512         res3a_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_11 (Activation)      (None, None, None, 1 0           bn3a_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3a_branch2b (Conv2D)         (None, None, None, 1 147584      activation_11[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3a_branch2b (BatchNormalizati (None, None, None, 1 512         res3a_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_12 (Activation)      (None, None, None, 1 0           bn3a_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3a_branch2c (Conv2D)         (None, None, None, 5 66048       activation_12[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3a_branch1 (Conv2D)          (None, None, None, 5 131584      activation_10[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3a_branch2c (BatchNormalizati (None, None, None, 5 2048        res3a_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "bn3a_branch1 (BatchNormalizatio (None, None, None, 5 2048        res3a_branch1[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "add_4 (Add)                     (None, None, None, 5 0           bn3a_branch2c[0][0]              \n",
            "                                                                 bn3a_branch1[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "activation_13 (Activation)      (None, None, None, 5 0           add_4[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res3b_branch2a (Conv2D)         (None, None, None, 1 65664       activation_13[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3b_branch2a (BatchNormalizati (None, None, None, 1 512         res3b_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_14 (Activation)      (None, None, None, 1 0           bn3b_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3b_branch2b (Conv2D)         (None, None, None, 1 147584      activation_14[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3b_branch2b (BatchNormalizati (None, None, None, 1 512         res3b_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_15 (Activation)      (None, None, None, 1 0           bn3b_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3b_branch2c (Conv2D)         (None, None, None, 5 66048       activation_15[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3b_branch2c (BatchNormalizati (None, None, None, 5 2048        res3b_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_5 (Add)                     (None, None, None, 5 0           bn3b_branch2c[0][0]              \n",
            "                                                                 activation_13[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_16 (Activation)      (None, None, None, 5 0           add_5[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res3c_branch2a (Conv2D)         (None, None, None, 1 65664       activation_16[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3c_branch2a (BatchNormalizati (None, None, None, 1 512         res3c_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_17 (Activation)      (None, None, None, 1 0           bn3c_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3c_branch2b (Conv2D)         (None, None, None, 1 147584      activation_17[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3c_branch2b (BatchNormalizati (None, None, None, 1 512         res3c_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_18 (Activation)      (None, None, None, 1 0           bn3c_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3c_branch2c (Conv2D)         (None, None, None, 5 66048       activation_18[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3c_branch2c (BatchNormalizati (None, None, None, 5 2048        res3c_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_6 (Add)                     (None, None, None, 5 0           bn3c_branch2c[0][0]              \n",
            "                                                                 activation_16[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_19 (Activation)      (None, None, None, 5 0           add_6[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res3d_branch2a (Conv2D)         (None, None, None, 1 65664       activation_19[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3d_branch2a (BatchNormalizati (None, None, None, 1 512         res3d_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_20 (Activation)      (None, None, None, 1 0           bn3d_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3d_branch2b (Conv2D)         (None, None, None, 1 147584      activation_20[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3d_branch2b (BatchNormalizati (None, None, None, 1 512         res3d_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_21 (Activation)      (None, None, None, 1 0           bn3d_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res3d_branch2c (Conv2D)         (None, None, None, 5 66048       activation_21[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn3d_branch2c (BatchNormalizati (None, None, None, 5 2048        res3d_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_7 (Add)                     (None, None, None, 5 0           bn3d_branch2c[0][0]              \n",
            "                                                                 activation_19[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_22 (Activation)      (None, None, None, 5 0           add_7[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res4a_branch2a (Conv2D)         (None, None, None, 2 131328      activation_22[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4a_branch2a (BatchNormalizati (None, None, None, 2 1024        res4a_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_23 (Activation)      (None, None, None, 2 0           bn4a_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4a_branch2b (Conv2D)         (None, None, None, 2 590080      activation_23[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4a_branch2b (BatchNormalizati (None, None, None, 2 1024        res4a_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_24 (Activation)      (None, None, None, 2 0           bn4a_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4a_branch2c (Conv2D)         (None, None, None, 1 263168      activation_24[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4a_branch1 (Conv2D)          (None, None, None, 1 525312      activation_22[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4a_branch2c (BatchNormalizati (None, None, None, 1 4096        res4a_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "bn4a_branch1 (BatchNormalizatio (None, None, None, 1 4096        res4a_branch1[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "add_8 (Add)                     (None, None, None, 1 0           bn4a_branch2c[0][0]              \n",
            "                                                                 bn4a_branch1[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "activation_25 (Activation)      (None, None, None, 1 0           add_8[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res4b_branch2a (Conv2D)         (None, None, None, 2 262400      activation_25[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4b_branch2a (BatchNormalizati (None, None, None, 2 1024        res4b_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_26 (Activation)      (None, None, None, 2 0           bn4b_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4b_branch2b (Conv2D)         (None, None, None, 2 590080      activation_26[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4b_branch2b (BatchNormalizati (None, None, None, 2 1024        res4b_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_27 (Activation)      (None, None, None, 2 0           bn4b_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4b_branch2c (Conv2D)         (None, None, None, 1 263168      activation_27[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4b_branch2c (BatchNormalizati (None, None, None, 1 4096        res4b_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_9 (Add)                     (None, None, None, 1 0           bn4b_branch2c[0][0]              \n",
            "                                                                 activation_25[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_28 (Activation)      (None, None, None, 1 0           add_9[0][0]                      \n",
            "__________________________________________________________________________________________________\n",
            "res4c_branch2a (Conv2D)         (None, None, None, 2 262400      activation_28[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4c_branch2a (BatchNormalizati (None, None, None, 2 1024        res4c_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_29 (Activation)      (None, None, None, 2 0           bn4c_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4c_branch2b (Conv2D)         (None, None, None, 2 590080      activation_29[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4c_branch2b (BatchNormalizati (None, None, None, 2 1024        res4c_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_30 (Activation)      (None, None, None, 2 0           bn4c_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4c_branch2c (Conv2D)         (None, None, None, 1 263168      activation_30[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4c_branch2c (BatchNormalizati (None, None, None, 1 4096        res4c_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_10 (Add)                    (None, None, None, 1 0           bn4c_branch2c[0][0]              \n",
            "                                                                 activation_28[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_31 (Activation)      (None, None, None, 1 0           add_10[0][0]                     \n",
            "__________________________________________________________________________________________________\n",
            "res4d_branch2a (Conv2D)         (None, None, None, 2 262400      activation_31[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4d_branch2a (BatchNormalizati (None, None, None, 2 1024        res4d_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_32 (Activation)      (None, None, None, 2 0           bn4d_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4d_branch2b (Conv2D)         (None, None, None, 2 590080      activation_32[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4d_branch2b (BatchNormalizati (None, None, None, 2 1024        res4d_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_33 (Activation)      (None, None, None, 2 0           bn4d_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4d_branch2c (Conv2D)         (None, None, None, 1 263168      activation_33[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4d_branch2c (BatchNormalizati (None, None, None, 1 4096        res4d_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_11 (Add)                    (None, None, None, 1 0           bn4d_branch2c[0][0]              \n",
            "                                                                 activation_31[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_34 (Activation)      (None, None, None, 1 0           add_11[0][0]                     \n",
            "__________________________________________________________________________________________________\n",
            "res4e_branch2a (Conv2D)         (None, None, None, 2 262400      activation_34[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4e_branch2a (BatchNormalizati (None, None, None, 2 1024        res4e_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_35 (Activation)      (None, None, None, 2 0           bn4e_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4e_branch2b (Conv2D)         (None, None, None, 2 590080      activation_35[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4e_branch2b (BatchNormalizati (None, None, None, 2 1024        res4e_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_36 (Activation)      (None, None, None, 2 0           bn4e_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4e_branch2c (Conv2D)         (None, None, None, 1 263168      activation_36[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4e_branch2c (BatchNormalizati (None, None, None, 1 4096        res4e_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_12 (Add)                    (None, None, None, 1 0           bn4e_branch2c[0][0]              \n",
            "                                                                 activation_34[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_37 (Activation)      (None, None, None, 1 0           add_12[0][0]                     \n",
            "__________________________________________________________________________________________________\n",
            "res4f_branch2a (Conv2D)         (None, None, None, 2 262400      activation_37[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4f_branch2a (BatchNormalizati (None, None, None, 2 1024        res4f_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_38 (Activation)      (None, None, None, 2 0           bn4f_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4f_branch2b (Conv2D)         (None, None, None, 2 590080      activation_38[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4f_branch2b (BatchNormalizati (None, None, None, 2 1024        res4f_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_39 (Activation)      (None, None, None, 2 0           bn4f_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res4f_branch2c (Conv2D)         (None, None, None, 1 263168      activation_39[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn4f_branch2c (BatchNormalizati (None, None, None, 1 4096        res4f_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_13 (Add)                    (None, None, None, 1 0           bn4f_branch2c[0][0]              \n",
            "                                                                 activation_37[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_40 (Activation)      (None, None, None, 1 0           add_13[0][0]                     \n",
            "__________________________________________________________________________________________________\n",
            "res5a_branch2a (Conv2D)         (None, None, None, 5 524800      activation_40[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5a_branch2a (BatchNormalizati (None, None, None, 5 2048        res5a_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_41 (Activation)      (None, None, None, 5 0           bn5a_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res5a_branch2b (Conv2D)         (None, None, None, 5 2359808     activation_41[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5a_branch2b (BatchNormalizati (None, None, None, 5 2048        res5a_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_42 (Activation)      (None, None, None, 5 0           bn5a_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res5a_branch2c (Conv2D)         (None, None, None, 2 1050624     activation_42[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res5a_branch1 (Conv2D)          (None, None, None, 2 2099200     activation_40[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5a_branch2c (BatchNormalizati (None, None, None, 2 8192        res5a_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "bn5a_branch1 (BatchNormalizatio (None, None, None, 2 8192        res5a_branch1[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "add_14 (Add)                    (None, None, None, 2 0           bn5a_branch2c[0][0]              \n",
            "                                                                 bn5a_branch1[0][0]               \n",
            "__________________________________________________________________________________________________\n",
            "activation_43 (Activation)      (None, None, None, 2 0           add_14[0][0]                     \n",
            "__________________________________________________________________________________________________\n",
            "res5b_branch2a (Conv2D)         (None, None, None, 5 1049088     activation_43[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5b_branch2a (BatchNormalizati (None, None, None, 5 2048        res5b_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_44 (Activation)      (None, None, None, 5 0           bn5b_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res5b_branch2b (Conv2D)         (None, None, None, 5 2359808     activation_44[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5b_branch2b (BatchNormalizati (None, None, None, 5 2048        res5b_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_45 (Activation)      (None, None, None, 5 0           bn5b_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res5b_branch2c (Conv2D)         (None, None, None, 2 1050624     activation_45[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5b_branch2c (BatchNormalizati (None, None, None, 2 8192        res5b_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_15 (Add)                    (None, None, None, 2 0           bn5b_branch2c[0][0]              \n",
            "                                                                 activation_43[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_46 (Activation)      (None, None, None, 2 0           add_15[0][0]                     \n",
            "__________________________________________________________________________________________________\n",
            "res5c_branch2a (Conv2D)         (None, None, None, 5 1049088     activation_46[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5c_branch2a (BatchNormalizati (None, None, None, 5 2048        res5c_branch2a[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_47 (Activation)      (None, None, None, 5 0           bn5c_branch2a[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res5c_branch2b (Conv2D)         (None, None, None, 5 2359808     activation_47[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5c_branch2b (BatchNormalizati (None, None, None, 5 2048        res5c_branch2b[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "activation_48 (Activation)      (None, None, None, 5 0           bn5c_branch2b[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "res5c_branch2c (Conv2D)         (None, None, None, 2 1050624     activation_48[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "bn5c_branch2c (BatchNormalizati (None, None, None, 2 8192        res5c_branch2c[0][0]             \n",
            "__________________________________________________________________________________________________\n",
            "add_16 (Add)                    (None, None, None, 2 0           bn5c_branch2c[0][0]              \n",
            "                                                                 activation_46[0][0]              \n",
            "__________________________________________________________________________________________________\n",
            "activation_49 (Activation)      (None, None, None, 2 0           add_16[0][0]                     \n",
            "==================================================================================================\n",
            "Total params: 23,587,712\n",
            "Trainable params: 23,534,592\n",
            "Non-trainable params: 53,120\n",
            "__________________________________________________________________________________________________\n",
            "layers:  175\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "75ybkLI2we6s",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "\n",
        "import os\n",
        "import tempfile\n",
        "\n",
        "def add_regularization(reg_model, regularizer=tf.keras.regularizers.l2(0.001)):\n",
        "\n",
        "    if not isinstance(regularizer, tf.keras.regularizers.Regularizer):\n",
        "      print(\"Regularizer must be a subclass of tf.keras.regularizers.Regularizer\")\n",
        "      return reg_model\n",
        "\n",
        "    for layer in reg_model.layers:\n",
        "        for attr in ['kernel_regularizer']:\n",
        "            if hasattr(layer, attr):\n",
        "              setattr(layer, attr, regularizer)\n",
        "\n",
        "    # When we change the layers attributes, the change only happens in the model config file\n",
        "    model_json = reg_model.to_json()\n",
        "\n",
        "    # Save the weights before reloading the model.\n",
        "    tmp_weights_path = os.path.join(tempfile.gettempdir(), 'tmp_weights.h5')\n",
        "    reg_model.save_weights(tmp_weights_path)\n",
        "\n",
        "    # load the model from the config\n",
        "    reg_model = tf.keras.models.model_from_json(model_json)\n",
        "    \n",
        "    # Reload the model weights\n",
        "    reg_model.load_weights(tmp_weights_path, by_name=True)\n",
        "    return reg_model\n"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "EchmfQcFp2K6",
        "colab_type": "code",
        "outputId": "c94e1ab9-8d64-41c1-9e08-db94cb77310e",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 240
        }
      },
      "source": [
        "#Still not talking about our train/test data or any pre-processing.\n",
        "#from tensorflow.keras.layers import Activation, Dropout, Flatten, Dense,Conv2D, MaxPooling2D\n",
        "from keras.layers.convolutional import Conv2D, MaxPooling2D, SeparableConv2D\n",
        "model = Sequential()\n",
        "# 1st layer as the lumpsum weights from resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5\n",
        "# NOTE that this layer will be set below as NOT TRAINABLE, i.e., use it as is\n",
        "Resnet_Model=ResNet50(include_top = False, pooling = RESNET50_POOLING_AVERAGE, weights = 'imagenet') #resnet_weights_path)\n",
        "model.add(Resnet_Model)\n",
        "# 2nd layer as Dense for 40-class classification using SoftMax activation\n",
        "model.add(Dense(NUM_CLASSES,activation = DENSE_LAYER_ACTIVATION)) #,  kernel_initializer='random_normal'\n",
        "# Say not to train first layer (ResNet) model as it is already trained\n",
        "model.layers[0].trainable = False\n",
        "model.summary()\n",
        "type(model)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Model: \"sequential_3\"\n",
            "_________________________________________________________________\n",
            "Layer (type)                 Output Shape              Param #   \n",
            "=================================================================\n",
            "resnet50 (Model)             (None, 2048)              23587712  \n",
            "_________________________________________________________________\n",
            "dense_1 (Dense)              (None, 40)                81960     \n",
            "=================================================================\n",
            "Total params: 23,669,672\n",
            "Trainable params: 81,960\n",
            "Non-trainable params: 23,587,712\n",
            "_________________________________________________________________\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "keras.engine.sequential.Sequential"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 7
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "JL7Li38n4Vnx",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "from tensorflow.keras import optimizers\n",
        "from tensorflow.keras.optimizers import Adam \n",
        "from tensorflow.keras.optimizers import SGD\n",
        "model=add_regularization(model)\n",
        "#sgdd= optimizers.SGD(lr = 0.01, momentum = 0.9, clipvalue=0.5 ,decay = 1e-6,nesterov = True) #, clipvalue=0.5 #,decay = 1e-6\n",
        "# model.compile(optimizer =sgd, loss = loss='categorical_crossentropy', metrics = ['accuracy']) #sgd\n",
        "model.compile(Adam(lr= 0.0001),loss='mean_squared_error', metrics=['accuracy']) #\n",
        "img_width, img_height = 224, 224\n",
        "from keras import backend as K  \n",
        "if K.image_data_format() == 'channels_first':\n",
        "    input_shape = (3, img_width, img_height)\n",
        "else:\n",
        "    input_shape = (img_width, img_height, 3)"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "DhqJVw7e5tP-",
        "colab_type": "code",
        "outputId": "9e9a1ca5-5395-4e88-aaed-cf2b8f233d4e",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 51
        }
      },
      "source": [
        "from keras.applications.resnet50 import preprocess_input\n",
        "from keras.preprocessing.image import ImageDataGenerator\n",
        "image_size = IMAGE_RESIZE\n",
        "\n",
        "NUM_EPOCHS = 50\n",
        "BATCH_SIZE_TRAINING = 13 #100\n",
        "BATCH_SIZE_VALIDATION =13 #100\n",
        "\n",
        "# These steps value should be proper FACTOR of no.-of-images in train & valid folders respectively\n",
        "# Training images processed in each step would be no.-of-train-images / STEPS_PER_EPOCH_TRAINING\n",
        "STEPS_PER_EPOCH_TRAINING =  160 // BATCH_SIZE_TRAINING #10\n",
        "STEPS_PER_EPOCH_VALIDATION = 40 // BATCH_SIZE_VALIDATION\n",
        "\n",
        "# Train data generator\n",
        "train_datagen = ImageDataGenerator( width_shift_range=0.1,\n",
        "    preprocessing_function=preprocess_input,\n",
        "    shear_range=0.2,\n",
        "    zoom_range=0.1,\n",
        "    horizontal_flip=False)\n",
        "Data_classes=[]\n",
        "for i in range (14,225):\n",
        "   Data_classes.append(i)\n",
        "\n",
        "#validation data generator\n",
        "validate_datagen = ImageDataGenerator(preprocessing_function=preprocess_input)\n",
        "# read the images from respective directories\n",
        "# read training images\n",
        "# train_batches= ImageDataGenerator.flow_from_directory(train_path,target_size=(224,224), Data_classes, )\n",
        "\n",
        "train_data_dir = '/content/drive/My Drive/Final_Fusion/Iris_Data/Train' \n",
        "#/content/drive/My Drive/Indian Database/Forty/Train'\n",
        "validation_data_dir = '/content/drive/My Drive/Final_Fusion/Iris_Data/Test'\n",
        "#'/content/drive/My Drive/Indian Database/Forty/Test'\n",
        "train_generator = train_datagen.flow_from_directory(\n",
        "    train_data_dir,\n",
        "    target_size=(img_width, img_height),\n",
        "    batch_size=BATCH_SIZE_TRAINING,\n",
        "    shuffle =True,\n",
        "    class_mode='categorical')\n",
        "\n",
        "# read validation images\n",
        "validation_generator = validate_datagen.flow_from_directory(\n",
        "    validation_data_dir,\n",
        "    target_size=(img_width, img_height),\n",
        "    shuffle=True,\n",
        "    batch_size=BATCH_SIZE_VALIDATION,\n",
        "    class_mode='categorical')\n",
        "\n",
        " #/content/drive/My Drive/OUR SDP/Iris Images/IIT_Left_Normalized/Test"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Found 160 images belonging to 40 classes.\n",
            "Found 40 images belonging to 40 classes.\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "sQzXoDLI-fHg",
        "colab_type": "code",
        "outputId": "59641b2d-f60f-47fd-eae1-d7d12c53f602",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "(BATCH_SIZE_TRAINING, len(train_generator), BATCH_SIZE_VALIDATION, len(validation_generator))"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "(13, 13, 13, 4)"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 10
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "-DpN0rF5APDx",
        "colab_type": "code",
        "outputId": "0711b775-2320-4ec4-e6a3-8b5ced0cf941",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "# Early stopping & checkpointing the best model in ../working dir & restoring that as our model for prediction\n",
        "from keras.callbacks import EarlyStopping, ModelCheckpoint\n",
        "cb_early_stopper = EarlyStopping(monitor = 'val_loss', patience = EARLY_STOP_PATIENCE)\n",
        "cb_checkpointer = ModelCheckpoint(filepath = 'BestChoice.hdf5', monitor = 'val_loss', save_best_only = True, mode = 'auto')\n",
        "print(STEPS_PER_EPOCH_TRAINING)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "12\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "kzypWRurAtCp",
        "colab_type": "code",
        "outputId": "b0da4fa5-60a2-4a80-bc72-bd798f9d06f1",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        }
      },
      "source": [
        "import tensorflow\n",
        "from tensorflow.keras.models import model_from_json\n",
        "fit_history = model.fit_generator(\n",
        "        train_generator,\n",
        "        steps_per_epoch=STEPS_PER_EPOCH_TRAINING, #\n",
        "        epochs = NUM_EPOCHS,\n",
        "        validation_data=validation_generator,\n",
        "        validation_steps=STEPS_PER_EPOCH_VALIDATION,\n",
        "        shuffle=True,\n",
        "        #callbacks=[cb_checkpointer, cb_early_stopper]\n",
        ")\n",
        "# serialize model to JSON\n",
        "model_json = model.to_json()\n",
        "with open(\"/content/drive/My Drive/Final_Fusion/SAVED MODELS/Iris Model/model_1.json\", \"w\") as json_file:\n",
        "    json_file.write(model_json)\n",
        "    print(\"[INFO] the model is saved into jason file.\")\n",
        "# serialize weights to HDF5\n",
        "print(\"[INFO] Saving the model weights...\")\n",
        "model.save_weights('/content/drive/My Drive/Final_Fusion/SAVED MODELS/Iris Model/adam_50epoch_iris.h5')\n"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "WARNING:tensorflow:From <ipython-input-12-fd7e912b9b83>:9: Model.fit_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.\n",
            "Instructions for updating:\n",
            "Please use Model.fit, which supports generators.\n",
            "Epoch 1/50\n",
            "12/12 [==============================] - 5s 385ms/step - loss: 0.0995 - accuracy: 0.1156 - val_loss: 0.0968 - val_accuracy: 0.2564\n",
            "Epoch 2/50\n",
            "12/12 [==============================] - 3s 219ms/step - loss: 0.0876 - accuracy: 0.6259 - val_loss: 0.0887 - val_accuracy: 0.4359\n",
            "Epoch 3/50\n",
            "12/12 [==============================] - 3s 209ms/step - loss: 0.0762 - accuracy: 0.8231 - val_loss: 0.0794 - val_accuracy: 0.5897\n",
            "Epoch 4/50\n",
            "12/12 [==============================] - 3s 208ms/step - loss: 0.0697 - accuracy: 0.8980 - val_loss: 0.0715 - val_accuracy: 0.8462\n",
            "Epoch 5/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0643 - accuracy: 0.9456 - val_loss: 0.0644 - val_accuracy: 0.9231\n",
            "Epoch 6/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0603 - accuracy: 0.9864 - val_loss: 0.0592 - val_accuracy: 0.9744\n",
            "Epoch 7/50\n",
            "12/12 [==============================] - 2s 208ms/step - loss: 0.0565 - accuracy: 1.0000 - val_loss: 0.0555 - val_accuracy: 1.0000\n",
            "Epoch 8/50\n",
            "12/12 [==============================] - 3s 209ms/step - loss: 0.0533 - accuracy: 1.0000 - val_loss: 0.0525 - val_accuracy: 1.0000\n",
            "Epoch 9/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0504 - accuracy: 1.0000 - val_loss: 0.0495 - val_accuracy: 1.0000\n",
            "Epoch 10/50\n",
            "12/12 [==============================] - 2s 206ms/step - loss: 0.0477 - accuracy: 1.0000 - val_loss: 0.0464 - val_accuracy: 1.0000\n",
            "Epoch 11/50\n",
            "12/12 [==============================] - 2s 206ms/step - loss: 0.0450 - accuracy: 1.0000 - val_loss: 0.0439 - val_accuracy: 1.0000\n",
            "Epoch 12/50\n",
            "12/12 [==============================] - 3s 208ms/step - loss: 0.0426 - accuracy: 1.0000 - val_loss: 0.0415 - val_accuracy: 1.0000\n",
            "Epoch 13/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0401 - accuracy: 1.0000 - val_loss: 0.0393 - val_accuracy: 1.0000\n",
            "Epoch 14/50\n",
            "12/12 [==============================] - 3s 211ms/step - loss: 0.0379 - accuracy: 1.0000 - val_loss: 0.0370 - val_accuracy: 1.0000\n",
            "Epoch 15/50\n",
            "12/12 [==============================] - 3s 208ms/step - loss: 0.0356 - accuracy: 1.0000 - val_loss: 0.0349 - val_accuracy: 1.0000\n",
            "Epoch 16/50\n",
            "12/12 [==============================] - 2s 204ms/step - loss: 0.0335 - accuracy: 1.0000 - val_loss: 0.0328 - val_accuracy: 1.0000\n",
            "Epoch 17/50\n",
            "12/12 [==============================] - 2s 202ms/step - loss: 0.0316 - accuracy: 1.0000 - val_loss: 0.0308 - val_accuracy: 1.0000\n",
            "Epoch 18/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0298 - accuracy: 1.0000 - val_loss: 0.0289 - val_accuracy: 1.0000\n",
            "Epoch 19/50\n",
            "12/12 [==============================] - 2s 208ms/step - loss: 0.0279 - accuracy: 1.0000 - val_loss: 0.0271 - val_accuracy: 1.0000\n",
            "Epoch 20/50\n",
            "12/12 [==============================] - 2s 203ms/step - loss: 0.0262 - accuracy: 1.0000 - val_loss: 0.0256 - val_accuracy: 1.0000\n",
            "Epoch 21/50\n",
            "12/12 [==============================] - 2s 206ms/step - loss: 0.0246 - accuracy: 1.0000 - val_loss: 0.0241 - val_accuracy: 1.0000\n",
            "Epoch 22/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0231 - accuracy: 1.0000 - val_loss: 0.0232 - val_accuracy: 1.0000\n",
            "Epoch 23/50\n",
            "12/12 [==============================] - 3s 209ms/step - loss: 0.0217 - accuracy: 1.0000 - val_loss: 0.0216 - val_accuracy: 1.0000\n",
            "Epoch 24/50\n",
            "12/12 [==============================] - 2s 208ms/step - loss: 0.0204 - accuracy: 1.0000 - val_loss: 0.0200 - val_accuracy: 1.0000\n",
            "Epoch 25/50\n",
            "12/12 [==============================] - 2s 208ms/step - loss: 0.0191 - accuracy: 1.0000 - val_loss: 0.0198 - val_accuracy: 0.9744\n",
            "Epoch 26/50\n",
            "12/12 [==============================] - 2s 206ms/step - loss: 0.0181 - accuracy: 1.0000 - val_loss: 0.0178 - val_accuracy: 1.0000\n",
            "Epoch 27/50\n",
            "12/12 [==============================] - 2s 204ms/step - loss: 0.0171 - accuracy: 1.0000 - val_loss: 0.0166 - val_accuracy: 1.0000\n",
            "Epoch 28/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0159 - accuracy: 1.0000 - val_loss: 0.0154 - val_accuracy: 1.0000\n",
            "Epoch 29/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0150 - accuracy: 1.0000 - val_loss: 0.0144 - val_accuracy: 1.0000\n",
            "Epoch 30/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0141 - accuracy: 1.0000 - val_loss: 0.0138 - val_accuracy: 1.0000\n",
            "Epoch 31/50\n",
            "12/12 [==============================] - 2s 206ms/step - loss: 0.0134 - accuracy: 1.0000 - val_loss: 0.0129 - val_accuracy: 1.0000\n",
            "Epoch 32/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0125 - accuracy: 1.0000 - val_loss: 0.0124 - val_accuracy: 1.0000\n",
            "Epoch 33/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0118 - accuracy: 1.0000 - val_loss: 0.0121 - val_accuracy: 0.9744\n",
            "Epoch 34/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0111 - accuracy: 1.0000 - val_loss: 0.0106 - val_accuracy: 1.0000\n",
            "Epoch 35/50\n",
            "12/12 [==============================] - 2s 206ms/step - loss: 0.0105 - accuracy: 1.0000 - val_loss: 0.0102 - val_accuracy: 1.0000\n",
            "Epoch 36/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0099 - accuracy: 1.0000 - val_loss: 0.0095 - val_accuracy: 1.0000\n",
            "Epoch 37/50\n",
            "12/12 [==============================] - 3s 209ms/step - loss: 0.0093 - accuracy: 1.0000 - val_loss: 0.0090 - val_accuracy: 1.0000\n",
            "Epoch 38/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0088 - accuracy: 1.0000 - val_loss: 0.0085 - val_accuracy: 1.0000\n",
            "Epoch 39/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0083 - accuracy: 1.0000 - val_loss: 0.0080 - val_accuracy: 1.0000\n",
            "Epoch 40/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0078 - accuracy: 1.0000 - val_loss: 0.0075 - val_accuracy: 1.0000\n",
            "Epoch 41/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0075 - accuracy: 1.0000 - val_loss: 0.0070 - val_accuracy: 1.0000\n",
            "Epoch 42/50\n",
            "12/12 [==============================] - 2s 208ms/step - loss: 0.0071 - accuracy: 0.9932 - val_loss: 0.0067 - val_accuracy: 1.0000\n",
            "Epoch 43/50\n",
            "12/12 [==============================] - 3s 213ms/step - loss: 0.0069 - accuracy: 0.9936 - val_loss: 0.0064 - val_accuracy: 1.0000\n",
            "Epoch 44/50\n",
            "12/12 [==============================] - 2s 206ms/step - loss: 0.0063 - accuracy: 1.0000 - val_loss: 0.0060 - val_accuracy: 1.0000\n",
            "Epoch 45/50\n",
            "12/12 [==============================] - 2s 204ms/step - loss: 0.0059 - accuracy: 1.0000 - val_loss: 0.0056 - val_accuracy: 1.0000\n",
            "Epoch 46/50\n",
            "12/12 [==============================] - 2s 205ms/step - loss: 0.0056 - accuracy: 1.0000 - val_loss: 0.0054 - val_accuracy: 1.0000\n",
            "Epoch 47/50\n",
            "12/12 [==============================] - 3s 212ms/step - loss: 0.0053 - accuracy: 1.0000 - val_loss: 0.0050 - val_accuracy: 1.0000\n",
            "Epoch 48/50\n",
            "12/12 [==============================] - 2s 204ms/step - loss: 0.0051 - accuracy: 1.0000 - val_loss: 0.0048 - val_accuracy: 1.0000\n",
            "Epoch 49/50\n",
            "12/12 [==============================] - 2s 207ms/step - loss: 0.0047 - accuracy: 1.0000 - val_loss: 0.0045 - val_accuracy: 1.0000\n",
            "Epoch 50/50\n",
            "12/12 [==============================] - 3s 211ms/step - loss: 0.0046 - accuracy: 1.0000 - val_loss: 0.0043 - val_accuracy: 1.0000\n",
            "[INFO] the model is saved into jason file.\n",
            "[INFO] Saving the model weights...\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "-_dJQbAPNyiC",
        "colab_type": "code",
        "outputId": "aecf7424-c183-418d-83ee-d263ad70ab7d",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 276
        }
      },
      "source": [
        "plt.figure(1, figsize = (15,8)) \n",
        "    \n",
        "plt.subplot(221)  \n",
        "plt.plot(fit_history.history['accuracy'])  \n",
        "plt.plot(fit_history.history['val_accuracy'])  \n",
        "plt.title('model accuracy')  \n",
        "plt.ylabel('accuracy')  \n",
        "plt.xlabel('epoch')  \n",
        "plt.legend(['train', 'valid']) \n",
        "    \n",
        "plt.subplot(222)  \n",
        "plt.plot(fit_history.history['loss'])  \n",
        "plt.plot(fit_history.history['val_loss'])  \n",
        "plt.title('model loss')  \n",
        "plt.ylabel('loss')  \n",
        "plt.xlabel('epoch')  \n",
        "plt.legend(['train', 'valid']) \n",
        "\n",
        "plt.show()"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAA3gAAAEDCAYAAABnFKZlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzdd3iV9fnH8fednUAIe4MBAWUpCKK460RFwargXhXcWuui/bXWUW1t3YqrDlyISEWpuJGhMgOyhyIzSNgJCSSQcf/+OAcbMYEAOXkyPq/rOlfOs875nLTm4T7fZe6OiIiIiIiIVH1RQQcQERERERGR8qECT0REREREpJpQgSciIiIiIlJNqMATERERERGpJlTgiYiIiIiIVBMq8ERERERERKoJFXgi5cTMhpnZ38p47gozOzXSmURERKq68rq/7svriFRlKvBERERERESqCRV4IvILZhYTdAYRERER2T8q8KRGCXfduMvM5prZNjN7xcyamNknZpZtZl+aWb1i559rZgvMLNPMJphZx2LHupvZrPB17wIJu71XXzObHb52spkdVsaMZ5vZd2a21cxWm9l9ux0/Lvx6meHjV4X3J5rZY2a20syyzOyb8L6TzCy9hN/DqeHn95nZKDN7y8y2AleZWS8zmxJ+j7Vm9qyZxRW7vrOZfWFmm81snZn9ycyamtl2M2tQ7LwjzGyDmcWW5bOLiEjVVBXuryVkHmRmS8P3sjFm1jy838zsCTNbH74XzzOzLuFjZ5nZwnC2NWZ25379wkQiSAWe1ETnA6cBHYBzgE+APwGNCP03cSuAmXUA3gF+Hz72MfBfM4sLFzsfAG8C9YH3wq9L+NruwKvAdUAD4EVgjJnFlyHfNuAKoC5wNnCDmfUPv+5B4bzPhDN1A2aHr3sU6AEcE850N1BUxt9JP2BU+D3fBgqB24GGQG/gFODGcIZk4EvgU6A50A4Y5+4ZwARgQLHXvRwY4e75ZcwhIiJVV2W/v/7MzE4G/k7ontUMWAmMCB8+HTgh/DlSwudsCh97BbjO3ZOBLsBX+/K+IhVBBZ7URM+4+z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IEnMk6Y2WIz+3204xARERlNlB8l1qjAExERERERGSdU4ImMMDO72czeMbP3zeznZhYysw4z+6GZbTWzV81sQrDuXDN7y8w2m9lqM8sJ2qeZ2Stm9oGZ/cnMpgabTzezp81sh5k9YWYWtR0VERH5BJQfRYaHCjyREWRms4DlwCJ3nwv0ATcBacBGd68AXge+G3zkV8B/d/c5wJYB7U8AD7v7BcBngI+C9guBe4DzgHOARRHfKRERkU9J+VFk+MRHOwCRGPN5YB7wbvDjYQrQAPQDvw3W+Q3wrJllAdnu/nrQ/jjwr2aWAZS4+2oAd+8GCLb3jrvvD+bfB8qBf4/8bomIiHwqyo8iw0QFnsjIMuBxd//OSY1m//OU9fw/uP0jA973oWNcRETGBuVHkWGiSzRFRtarwFfNrADAzHLNbDLhY/GrwTpfA/7d3duAFjP7i6D9L4HX3b0d2G9m1wXbSDKz1BHdCxERkeGl/CgyTPTrhcgIcvdtZvZ3wEtmFgf0AncCh4GFwbIGwvchANwC/CxIUHuAW4P2vwR+bmbfD7axbAR3Q0REZFgpP4oMH3P/j57pFpHhYmYd7p4e7ThERERGE+VHkU9Ol2iKiIiIiIiMEzqDJyIiIiIiMk7oDJ6IiIiIiMg4oQJPRERERERknFCBJyIiIiIiMk6owBMRERERERknVOCJiIiIiIiMEyrwRERERERExon/DxkNMm6FP5tyAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 1080x576 with 2 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "IPrpkTRkP3HJ",
        "colab_type": "code",
        "outputId": "1df0fe5e-71bc-4bab-b0da-1fd41ca855c4",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 51
        }
      },
      "source": [
        "# NOTE that flow_from_directory treats each sub-folder as a class which works fine for training data\n",
        "# Actually class_mode=None is a kind of workaround for test data which too must be kept in a subfolder\n",
        "# batch_size can be 1 or any factor of test dataset size to ensure that test dataset is samples just once, i.e., no data is left out\n",
        "test_generator= validate_datagen.flow_from_directory(\n",
        "    directory ='/content/drive/My Drive/Final_Fusion/Iris_Data/Test',\n",
        "    # '/content/drive/My Drive/Face_D/Test',\n",
        "    target_size = (image_size, image_size),\n",
        "    batch_size = 1,#BATCH_SIZE_TESTING,\n",
        "    class_mode = None,\n",
        "    shuffle = False,\n",
        "    seed = 123\n",
        ")\n",
        "\n",
        "test_generator_random=validate_datagen.flow_from_directory(\n",
        "    directory ='/content/drive/My Drive/Final_Fusion/Iris_Data/Iris_Outsider',\n",
        "    # '/content/drive/My Drive/Face_D/Test',\n",
        "    target_size = (image_size, image_size),\n",
        "    batch_size = 1,#BATCH_SIZE_TESTING,\n",
        "    class_mode = None,\n",
        "    shuffle = False,\n",
        "    seed = 123\n",
        ")\n",
        "\n"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Found 40 images belonging to 40 classes.\n",
            "Found 40 images belonging to 1 classes.\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Il-eDRB5-87c",
        "colab_type": "code",
        "outputId": "bd99d29b-e4b3-4173-cd43-d02550287a60",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 294
        }
      },
      "source": [
        "import numpy as np\n",
        "test_generator.reset()\n",
        "from sklearn.metrics import confusion_matrix \n",
        "\n",
        "actual_labels = test_generator.classes\n",
        "print(actual_labels)\n",
        "print(test_generator.filenames)\n",
        "pred = model.predict_generator(test_generator, steps = len(test_generator), verbose = 1)\n",
        "random_pred=model.predict_generator(test_generator_random, steps = len(test_generator_random), verbose = 1)\n",
        "predicted_class_indices = np.argmax(pred, axis = 1)\n",
        " \n",
        " # confusion matrix, all corrected classified classes are in the diagonal entries of the matrix\n",
        " # the colomuns are actual labels vs Rows as predicted Labels\n",
        "\n",
        "cm = confusion_matrix(actual_labels,predicted_class_indices)\n",
        "print(cm)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23\n",
            " 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39]\n",
            "['Person_01/Person_1_5_L.bmp', 'Person_02/Person_2_5_L.bmp', 'Person_03/Person_3_5_L.bmp', 'Person_04/Person_4_5_L.bmp', 'Person_05/Person_5_5_L.bmp', 'Person_06/Person_6_5_L.bmp', 'Person_07/Person_7_5_L.bmp', 'Person_08/Person_8_5_L.bmp', 'Person_09/Person_9_5_L.bmp', 'Person_10/Person_10_5_L.bmp', 'Person_11/Person_11_5_L.bmp', 'Person_12/Person_12_5_L.bmp', 'Person_13/Person_13_4_L.bmp', 'Person_14/Person_14_5_L.bmp', 'Person_15/Person_15_5_L.bmp', 'Person_16/Person_16_5_L.bmp', 'Person_17/Person_17_5_L.bmp', 'Person_18/Person_18_5_L.bmp', 'Person_19/Person_19_5_L.bmp', 'Person_20/Person_20_5_L.bmp', 'Person_21/Person_21_5_L.bmp', 'Person_22/Person_22_5_L.bmp', 'Person_23/Person_23_5_L.bmp', 'Person_24/Person_24_5_L.bmp', 'Person_25/Person_25_5_L.bmp', 'Person_26/Person_26_5_L.bmp', 'Person_27/Person_27_5_L.bmp', 'Person_28/Person_28_5_L.bmp', 'Person_29/Person_29_5_L.bmp', 'Person_30/Person_30_5_L.bmp', 'Person_31/Person_31_5_L.bmp', 'Person_32/Person_32_5_L.bmp', 'Person_33/Person_33_5_L.bmp', 'Person_34/Person_34_5_L.bmp', 'Person_35/Person_35_5_L.bmp', 'Person_36/Person_36_5_L.bmp', 'Person_37/Person_37_5_L.bmp', 'Person_38/Person_38_5_L.bmp', 'Person_39/Person_39_5_L.bmp', 'Person_40/Person_40_5_L.bmp']\n",
            "WARNING:tensorflow:From <ipython-input-15-62d72a91ca89>:8: Model.predict_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.\n",
            "Instructions for updating:\n",
            "Please use Model.predict, which supports generators.\n",
            "40/40 [==============================] - 0s 9ms/step\n",
            "40/40 [==============================] - 0s 9ms/step\n",
            "[[1 0 0 ... 0 0 0]\n",
            " [0 1 0 ... 0 0 0]\n",
            " [0 0 1 ... 0 0 0]\n",
            " ...\n",
            " [0 0 0 ... 1 0 0]\n",
            " [0 0 0 ... 0 1 0]\n",
            " [0 0 0 ... 0 0 1]]\n"
          ],
          "name": "stdout"
        }
      ]
    }
  ]
}